IQSS/8286 enable i18n search of cvv fields #8435
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it: Before this, controlled vocabulary values were only being indexed by the cvv names (i.e. as in the tsv) and not by the language-specific translations. This creates #8286 in which users (in the UI or via API) don't have a good way to search for these values (UI users can use the facet, but putting the language-specific term in the facet in the search box would fail to find the same datasets.) As an incremental fix, this PR leaves the facet field (e.g. subect_ss) as is but indexes all of the configured language variants in the main field (e.g. subject). This means that searches against the field will work (e.g. subject:Chimie - French for Chemistry), and the same search via API will also work. Configured languages are those configured for either the display languages (which ones the overall UI can be shown in ) and those allowed for Dataset metadata (e.g. controlled by the metadata languages setting).
Which issue(s) this PR closes:
Closes #8286
Special notes for your reviewer:
As noted, this is incremental. The limitations are:
Suggestions on how to test this: Configure with multiple display and/or metadata languages and verify that searches using the basic search box work with the translated values. And that facet search also works as before. One could also test the API call with the same queries. Sciences PO might be able to assist in setup and/or testing.
Does this PR introduce a user interface change? If mockups are available, please link/include them here: only in terms of allowing user entered translated terms to produce search results.
Is there a release notes update needed for this change?:
Additional documentation: